﻿using System;
using RpcHelper;
using RpcModel;
using Wedonek.RpcStore.Service.DAL;
using Wedonek.RpcStore.Service.Interface;
using Wedonek.RpcStore.Service.Model;
namespace Wedonek.RpcStore.Service.Collect
{
    internal class ResourceModularCollect : BasicCollect<ResourceModularDAL>, IResourceModularCollect
    {
        public BasicModular[] Gets(long systemTypeId)
        {
            return base.BasicDAL.Gets(systemTypeId);
        }
        public void SetRemark(Guid id, string remark)
        {
            base.BasicDAL.SetRemark(id, remark);
        }
        public ResourceModular[] Query(ModularQueryParam query, IBasicPage paging, out long count)
        {
            return base.BasicDAL.Query(query, paging, out count);
        }

        public ResourceModular Get(Guid modularId)
        {
            ResourceModular modular = base.BasicDAL.Get(modularId);
            if (modular == null)
            {
                throw new ErrorException("rpc.resource.modular.not.find");
            }
            return modular;
        }
    }
}
